#include <bits/stdc++.h>
using namespace std;
typedef pair<string, string> name;
const int N = 110;
name names[N];
int n;
map<string, int> cnt;
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> names[i].first >> names[i].second;
  for (int i = 0; i < n; ++i) {
    cnt[names[i].first]++;
    if (names[i].first != names[i].second) cnt[names[i].second]++;
  }
  bool ans = true;
  for (int i = 0; i < n; ++i) {
    if (cnt[names[i].first] >= 2 && cnt[names[i].second] >= 2) {
      ans = false;
    }
  }
  cout << (ans ? "Yes\n" : "No\n");
}
